package hot100;


/*
 * Author：江松
 * Date：2023/4/25 16:52
 *

 */

import java.util.LinkedList;
import java.util.List;

public class Main94 {
      public class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
    TreeNode() {}
    TreeNode(int val) { this.val = val; }
    TreeNode(int val, TreeNode left, TreeNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }
}


    List<Integer>res=new LinkedList<>();
    public List<Integer> inorderTraversal(TreeNode root) {
        if(root==null)return res;
        inorderTraversal(root.left);
        res.add(root.val);
        inorderTraversal(root.right);
        return res;
    }
}
